/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * AgregarUserView.java
 *
 * Created on 25-abr-2012, 11:47:26
 */
package educar.abmDocente;

import java.awt.event.ActionListener;
import javax.swing.JButton;

/**
 *
 * @author gaston
 */
public class AgregarDocenteView extends javax.swing.JDialog {

// <editor-fold defaultstate="collapsed" desc="Constructor">
    /**
     * AgregarDocenteView(): Constructor de la clase AgregarDocenteView
     */
    public AgregarDocenteView() {
        initComponents();
    }
// </editor-fold>

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jlTitulo = new javax.swing.JLabel();
        jldni = new javax.swing.JLabel();
        jtfDni = new javax.swing.JTextField();
        jtfNombreYApellido = new javax.swing.JTextField();
        jtfDireccion = new javax.swing.JTextField();
        jlnombreYApellido = new javax.swing.JLabel();
        jldireccion = new javax.swing.JLabel();
        jbAgregar = new javax.swing.JButton();
        jbCancelar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        jlTitulo.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jlTitulo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jlTitulo.setText("Agregar Nuevo Docente");

        jldni.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jldni.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jldni.setText("DNI");

        jlnombreYApellido.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jlnombreYApellido.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jlnombreYApellido.setText("Nombre y Apellido");

        jldireccion.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jldireccion.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jldireccion.setText("Direccion");

        jbAgregar.setText("Agregar");

        jbCancelar.setText("Cancelar");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jlTitulo, javax.swing.GroupLayout.DEFAULT_SIZE, 343, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jldireccion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jlnombreYApellido, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jldni, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jtfNombreYApellido)
                            .addComponent(jtfDni, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE)
                            .addComponent(jtfDireccion)))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jbAgregar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 201, Short.MAX_VALUE)
                        .addComponent(jbCancelar)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jlTitulo, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jldni, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jtfDni, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtfNombreYApellido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jlnombreYApellido, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtfDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jldireccion, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 84, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jbAgregar)
                    .addComponent(jbCancelar))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

// <editor-fold defaultstate="collapsed" desc="Declaracion de variables">
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jbAgregar;
    private javax.swing.JButton jbCancelar;
    private javax.swing.JLabel jlTitulo;
    private javax.swing.JLabel jldireccion;
    private javax.swing.JLabel jldni;
    private javax.swing.JLabel jlnombreYApellido;
    private javax.swing.JTextField jtfDireccion;
    private javax.swing.JTextField jtfDni;
    private javax.swing.JTextField jtfNombreYApellido;
    // End of variables declaration//GEN-END:variables
// </editor-fold>

    /**
     * 
     * @return jbAgregar
     */
    public JButton getJbAgregar() {
        return jbAgregar;
    }

    
    /**
     * 
     * @return jbCancelar
     */
    public JButton getJbCancelar() {
        return jbCancelar;
    }

    
    /**
     * 
     * @return jtNombreYApellido
     */
    public String getNombreYApellido() {
        return jtfNombreYApellido.getText();
    }

    
    /**
     * 
     * @return jtfDireccion.getText()
     */
    public String getDireccion() {
        return jtfDireccion.getText();
    }

    
    /**
     * 
     * @return jtfDni.getText()
     */
    public String getDni() {
        return jtfDni.getText();
    }
    
    
    /**
     * 
     * @param nombreYApellido 
     */
    public void setNombreYApellido(String nombreYApellido){
        this.jtfNombreYApellido.setText(nombreYApellido);
    }
    
    /**
     * 
     * @param direccion 
     */
    public void setDireccion(String direccion){
        this.jtfDireccion.setText(direccion);
    }
    
    /**
     * 
     * @param dni 
     */
    public void setDni(String dni){
        this.jtfDni.setText(dni);
    }
    
    /**
     * 
     * @param listener 
     */
    public void setActionListener(ActionListener listener) {
        jbAgregar.addActionListener(listener);
        jbCancelar.addActionListener(listener);
    }
    
    /**
     * 
     * @param listener 
     */
    public void setWindowListener(AgregarDocenteController listener){
        this.addWindowListener(listener);
    }

    
}//Fin de la clase AgregarDocenteView.